package models;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "t_TruckInfo")
public class TruckInfo_NT_Entity implements Serializable{
    public static final long serialVersionUID = 1L;

    private Integer fdRowId;
    private String fdTruckNumber;
    private int fdDeptId;
    private BigDecimal fdLoadCapacity;
    private String fdModifiedDate;
    private int fdTruckHeight;
    private int fdTruckLength;
    private int fdTruckWidth;
    private int fdType;
    private Integer fdGps;
    private String fdGpsEqptNo;
    private String fdSimno;
    private String fdGpsProvider;
    private String fdLastGpsData;
    private String fdLastPosi;
    private String fdLastTime;
    private String fdNowStatus;

    @Id
    @Column(name = "fd_RowID", nullable = false)
    public Integer getFdRowId() {
        return fdRowId;
    }

    public void setFdRowId(Integer fdRowId) {
        this.fdRowId = fdRowId;
    }

    @Basic
    @Column(name = "fd_TruckNumber", nullable = false, length = 20)
    public String getFdTruckNumber() {
        return fdTruckNumber;
    }

    public void setFdTruckNumber(String fdTruckNumber) {
        this.fdTruckNumber = fdTruckNumber;
    }

    @Basic
    @Column(name = "fd_DeptID", nullable = false)
    public int getFdDeptId() {
        return fdDeptId;
    }

    public void setFdDeptId(int fdDeptId) {
        this.fdDeptId = fdDeptId;
    }

    @Basic
    @Column(name = "fd_loadCapacity", nullable = false, precision = 2)
    public BigDecimal getFdLoadCapacity() {
        return fdLoadCapacity;
    }

    public void setFdLoadCapacity(BigDecimal fdLoadCapacity) {
        this.fdLoadCapacity = fdLoadCapacity;
    }

    @Basic
    @Column(name = "fd_ModifiedDate", nullable = false)
    public String getFdModifiedDate() {
        return fdModifiedDate;
    }

    public void setFdModifiedDate(String fdModifiedDate) {
        this.fdModifiedDate = fdModifiedDate;
    }

    @Basic
    @Column(name = "fd_TruckHeight", nullable = false)
    public int getFdTruckHeight() {
        return fdTruckHeight;
    }

    public void setFdTruckHeight(int fdTruckHeight) {
        this.fdTruckHeight = fdTruckHeight;
    }

    @Basic
    @Column(name = "fd_TruckLength", nullable = false)
    public int getFdTruckLength() {
        return fdTruckLength;
    }

    public void setFdTruckLength(int fdTruckLength) {
        this.fdTruckLength = fdTruckLength;
    }

    @Basic
    @Column(name = "fd_TruckWidth", nullable = false)
    public int getFdTruckWidth() {
        return fdTruckWidth;
    }

    public void setFdTruckWidth(int fdTruckWidth) {
        this.fdTruckWidth = fdTruckWidth;
    }

    @Basic
    @Column(name = "fd_Type", nullable = false)
    public int getFdType() {
        return fdType;
    }

    public void setFdType(int fdType) {
        this.fdType = fdType;
    }

    @Basic
    @Column(name = "fd_gps", nullable = true)
    public Integer getFdGps() {
        return fdGps;
    }

    public void setFdGps(Integer fdGps) {
        this.fdGps = fdGps;
    }

    @Basic
    @Column(name = "fd_GpsEqptNo", nullable = true, length = 50)
    public String getFdGpsEqptNo() {
        return fdGpsEqptNo;
    }

    public void setFdGpsEqptNo(String fdGpsEqptNo) {
        this.fdGpsEqptNo = fdGpsEqptNo;
    }

    @Basic
    @Column(name = "fd_SIMNO", nullable = true, length = 50)
    public String getFdSimno() {
        return fdSimno;
    }

    public void setFdSimno(String fdSimno) {
        this.fdSimno = fdSimno;
    }

    @Basic
    @Column(name = "fd_GPSProvider", nullable = true, length = 100)
    public String getFdGpsProvider() {
        return fdGpsProvider;
    }

    public void setFdGpsProvider(String fdGpsProvider) {
        this.fdGpsProvider = fdGpsProvider;
    }

    @Basic
    @Column(name = "fd_LastGpsData", nullable = true, length = 50)
    public String getFdLastGpsData() {
        return fdLastGpsData;
    }

    public void setFdLastGpsData(String fdLastGpsData) {
        this.fdLastGpsData = fdLastGpsData;
    }

    @Basic
    @Column(name = "fd_LastPosi", nullable = true, length = 50)
    public String getFdLastPosi() {
        return fdLastPosi;
    }

    public void setFdLastPosi(String fdLastPosi) {
        this.fdLastPosi = fdLastPosi;
    }

    @Basic
    @Column(name = "fd_LastTime", nullable = true)
    public String getFdLastTime() {
        return fdLastTime;
    }

    public void setFdLastTime(String fdLastTime) {
        this.fdLastTime = fdLastTime;
    }

    @Basic
    @Column(name = "fd_NowStatus", nullable = true, length = 50)
    public String getFdNowStatus() {
        return fdNowStatus;
    }

    public void setFdNowStatus(String fdNowStatus) {
        this.fdNowStatus = fdNowStatus;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TruckInfo_NT_Entity that = (TruckInfo_NT_Entity) o;
        return fdRowId == that.fdRowId &&
                fdDeptId == that.fdDeptId &&
                fdTruckHeight == that.fdTruckHeight &&
                fdTruckLength == that.fdTruckLength &&
                fdTruckWidth == that.fdTruckWidth &&
                fdType == that.fdType &&
                Objects.equals(fdTruckNumber, that.fdTruckNumber) &&
                Objects.equals(fdLoadCapacity, that.fdLoadCapacity) &&
                Objects.equals(fdModifiedDate, that.fdModifiedDate) &&
                Objects.equals(fdGps, that.fdGps) &&
                Objects.equals(fdGpsEqptNo, that.fdGpsEqptNo) &&
                Objects.equals(fdSimno, that.fdSimno) &&
                Objects.equals(fdGpsProvider, that.fdGpsProvider) &&
                Objects.equals(fdLastGpsData, that.fdLastGpsData) &&
                Objects.equals(fdLastPosi, that.fdLastPosi) &&
                Objects.equals(fdLastTime, that.fdLastTime) &&
                Objects.equals(fdNowStatus, that.fdNowStatus);
    }

    @Override
    public int hashCode() {

        return Objects.hash(fdRowId, fdTruckNumber, fdDeptId, fdLoadCapacity, fdModifiedDate, fdTruckHeight, fdTruckLength, fdTruckWidth, fdType, fdGps, fdGpsEqptNo, fdSimno, fdGpsProvider, fdLastGpsData, fdLastPosi, fdLastTime, fdNowStatus);
    }
}
